/*
 * ShotSocketSender.h
 *
 *  Created on: Oct 6, 2012
 *      Author: Administrator
 */

#ifndef SHOTSOCKETSENDER_H_
#define SHOTSOCKETSENDER_H_

#include <FNet.h>
#include "IShotSender.h"

class ShotSocketSender :
	public IShotSender,
	public Osp::Net::Sockets::ISocketEventListener

	{

	public:
		ShotSocketSender();
		virtual ~ShotSocketSender();

	public:
		virtual void SendShot(Shot* shot);

	public:
		virtual void  OnSocketAccept (Osp::Net::Sockets::Socket &socket);
		virtual void  OnSocketClosed (Osp::Net::Sockets::Socket &socket, Osp::Net::Sockets::NetSocketClosedReason reason);
		virtual void  OnSocketConnected (Osp::Net::Sockets::Socket &socket);
		virtual void  OnSocketReadyToReceive (Osp::Net::Sockets::Socket &socket);
		virtual void  OnSocketReadyToSend (Osp::Net::Sockets::Socket &socket);

	private:
		Osp::Net::Sockets::Socket* socket;
		bool isReadyToSend;

};

#endif /* SHOTSOCKETSENDER_H_ */
